Optimal. Leaf size=130 \[ \frac {5 a x}{2}+\frac {5 a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {5 a \cos (c+d x)}{2 d}-\frac {5 a \cos ^3(c+d x)}{6 d}+\frac {5 a \cot (c+d x)}{2 d}-\frac {a \cos ^3(c+d x) \cot ^2(c+d x)}{2 d}-\frac {5 a \cot ^3(c+d x)}{6 d}+\frac {a \cos ^2(c+d x) \cot ^3(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2917, 2671,
294, 308, 209, 2672, 212} \begin {gather*} -\frac {5 a \cos ^3(c+d x)}{6 d}-\frac {5 a \cos (c+d x)}{2 d}-\frac {5 a \cot ^3(c+d x)}{6 d}+\frac {5 a \cot (c+d x)}{2 d}-\frac {a \cos ^3(c+d x) \cot ^2(c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}+\frac {5 a \tanh ^{-1}(\cos (c+d x))}{2 d}+\frac {5 a x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 294
Rule 308
Rule 2671
Rule 2672
Rule 2917
Rubi steps
\begin {align*} \int \cos ^2(c+d x) \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cos ^3(c+d x) \cot ^3(c+d x) \, dx+a \int \cos ^2(c+d x) \cot ^4(c+d x) \, dx\\ &=-\frac {a \text {Subst}\left (\int \frac {x^6}{\left (1-x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d}-\frac {a \text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {a \cos ^3(c+d x) \cot ^2(c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}+\frac {(5 a) \text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 d}-\frac {(5 a) \text {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=-\frac {a \cos ^3(c+d x) \cot ^2(c+d x)}{2 d}+\frac {a \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}+\frac {(5 a) \text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\cos (c+d x)\right )}{2 d}-\frac {(5 a) \text {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=-\frac {5 a \cos (c+d x)}{2 d}-\frac {5 a \cos ^3(c+d x)}{6 d}+\frac {5 a \cot (c+d x)}{2 d}-\frac {a \cos ^3(c+d x) \cot ^2(c+d x)}{2 d}-\frac {5 a \cot ^3(c+d x)}{6 d}+\frac {a \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}+\frac {(5 a) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 d}-\frac {(5 a) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=\frac {5 a x}{2}+\frac {5 a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {5 a \cos (c+d x)}{2 d}-\frac {5 a \cos ^3(c+d x)}{6 d}+\frac {5 a \cot (c+d x)}{2 d}-\frac {a \cos ^3(c+d x) \cot ^2(c+d x)}{2 d}-\frac {5 a \cot ^3(c+d x)}{6 d}+\frac {a \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 6.13, size = 174, normalized size = 1.34 \begin {gather*} \frac {5 a (c+d x)}{2 d}-\frac {9 a \cos (c+d x)}{4 d}-\frac {a \cos (3 (c+d x))}{12 d}+\frac {7 a \cot (c+d x)}{3 d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d}+\frac {5 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {5 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a \sin (2 (c+d x))}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 154, normalized size = 1.18
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{7}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \left (\cos ^{7}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+a \left (-\frac {\cos ^{7}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{5}\left (d x +c \right )\right )}{2}-\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {5 \cos \left (d x +c \right )}{2}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(154\) |
default | \(\frac {a \left (-\frac {\cos ^{7}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \left (\cos ^{7}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )+a \left (-\frac {\cos ^{7}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{5}\left (d x +c \right )\right )}{2}-\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {5 \cos \left (d x +c \right )}{2}-\frac {5 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )}{d}\) | \(154\) |
risch | \(\frac {5 a x}{2}-\frac {i a \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {9 a \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {9 a \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {i a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {a \left (18 i {\mathrm e}^{4 i \left (d x +c \right )}+3 \,{\mathrm e}^{5 i \left (d x +c \right )}-24 i {\mathrm e}^{2 i \left (d x +c \right )}+14 i-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}-\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}+\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {a \cos \left (3 d x +3 c \right )}{12 d}\) | \(187\) |
norman | \(\frac {\frac {a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a}{24 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {25 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {25 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {5 a x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {15 a x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {15 a x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {5 a x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {55 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {65 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {75 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {5 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(279\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 122, normalized size = 0.94 \begin {gather*} -\frac {{\left (4 \, \cos \left (d x + c\right )^{3} - \frac {6 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + 24 \, \cos \left (d x + c\right ) - 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} a - 2 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} a}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 182, normalized size = 1.40 \begin {gather*} -\frac {6 \, a \cos \left (d x + c\right )^{5} - 40 \, a \cos \left (d x + c\right )^{3} - 15 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 15 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 30 \, a \cos \left (d x + c\right ) + 2 \, {\left (2 \, a \cos \left (d x + c\right )^{5} - 15 \, a d x \cos \left (d x + c\right )^{2} + 10 \, a \cos \left (d x + c\right )^{3} + 15 \, a d x - 15 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 220, normalized size = 1.69 \begin {gather*} \frac {3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 180 \, {\left (d x + c\right )} a - 180 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 81 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {110 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 111 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 240 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 273 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 306 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 253 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 72 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}^{3}}}{72 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.97, size = 310, normalized size = 2.38 \begin {gather*} \frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+49\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-\frac {80\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{3}+67\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-34\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {121\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}-8\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{3}}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}-\frac {9\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {5\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {5\,a\,\mathrm {atan}\left (\frac {25\,a^2}{25\,a^2+25\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {25\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{25\,a^2+25\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________